<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>LCV Framework: i2c.c-Dateireferenz</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Erzeugt von Doxygen 1.5.3 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Hauptseite</span></a></li>
    <li><a href="classes.html"><span>Datenstrukturen</span></a></li>
    <li class="current"><a href="files.html"><span>Dateien</span></a></li>
  </ul>
</div>
<h1>i2c.c-Dateireferenz</h1><code>#include &quot;i2c-dev.h&quot;</code><br>
<code>#include &quot;<a class="el" href="i2c_8h-source.html">i2c.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="log_8h-source.html">log.h</a>&quot;</code><br>
<code>#include &lt;string.h&gt;</code><br>
<code>#include &lt;stdlib.h&gt;</code><br>
<code>#include &lt;sys/types.h&gt;</code><br>
<code>#include &lt;sys/stat.h&gt;</code><br>
<code>#include &lt;sys/poll.h&gt;</code><br>
<code>#include &lt;stdio.h&gt;</code><br>
<code>#include &lt;fcntl.h&gt;</code><br>
<code>#include &lt;unistd.h&gt;</code><br>
<code>#include &lt;sys/ioctl.h&gt;</code><br>

<p>
<a href="i2c_8c-source.html">gehe zum Quellcode dieser Datei</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Makrodefinitionen</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="i2c_8c.html#649ca8c7e017db38d09d4834dfccd361">I2C_SLAVE_ADDR</a>&nbsp;&nbsp;&nbsp;0x38</td></tr>

<tr><td colspan="2"><br><h2>Funktionen</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="i2c_8c.html#aefacaff83104e4b19526ea1af6f7da5">lcv_i2c_write_register</a> (char *device, unsigned char client, unsigned char reg, unsigned short value)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Lies ein Register über einen I2C-Bus.  <a href="#aefacaff83104e4b19526ea1af6f7da5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="i2c_8c.html#2b821832a74e3197fecba3661422cd27">lcv_i2c_read_register</a> (char *device, unsigned char client, unsigned char reg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Schreibt ein Register über einen I2C-Bus.  <a href="#2b821832a74e3197fecba3661422cd27"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="i2c_8c.html#d24ed091971ab74561f0180091122aa1">lcv_i2c_dump_register</a> (char *device, unsigned char client, unsigned short start, unsigned short end)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Erstellt einen Dump eines Clients über einen I2C-Bus.  <a href="#d24ed091971ab74561f0180091122aa1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="i2c_8c.html#fefa8202689ea920247d64e005ac5fca">lcv_i2c_scan_bus</a> (char *device)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Scannt den I2C-Bus.  <a href="#fefa8202689ea920247d64e005ac5fca"></a><br></td></tr>
</table>
<hr><h2>Makro-Dokumentation</h2>
<a class="anchor" name="649ca8c7e017db38d09d4834dfccd361"></a><!-- doxytag: member="i2c.c::I2C_SLAVE_ADDR" ref="649ca8c7e017db38d09d4834dfccd361" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define I2C_SLAVE_ADDR&nbsp;&nbsp;&nbsp;0x38          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definiert in Zeile <a class="el" href="i2c_8c-source.html#l00050">50</a> der Datei <a class="el" href="i2c_8c-source.html">i2c.c</a>.</p>

<p>Wird benutzt von <a class="el" href="i2c_8c-source.html#l00151">lcv_i2c_dump_register()</a>, <a class="el" href="i2c_8c-source.html#l00096">lcv_i2c_read_register()</a>, <a class="el" href="i2c_8c-source.html#l00211">lcv_i2c_scan_bus()</a> und <a class="el" href="i2c_8c-source.html#l00053">lcv_i2c_write_register()</a>.</p>

</div>
</div><p>
<hr><h2>Dokumentation der Funktionen</h2>
<a class="anchor" name="d24ed091971ab74561f0180091122aa1"></a><!-- doxytag: member="i2c.c::lcv_i2c_dump_register" ref="d24ed091971ab74561f0180091122aa1" args="(char *device, unsigned char client, unsigned short start, unsigned short end)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void lcv_i2c_dump_register           </td>
          <td>(</td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>device</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&nbsp;</td>
          <td class="paramname"> <em>client</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned short&nbsp;</td>
          <td class="paramname"> <em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned short&nbsp;</td>
          <td class="paramname"> <em>end</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Erstellt einen Dump eines Clients über einen I2C-Bus. 
<p>
<dl compact><dt><b>Parameter:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>device</em>&nbsp;</td><td>Device </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>client</em>&nbsp;</td><td>Client </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>start</em>&nbsp;</td><td>Startadresse </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>end</em>&nbsp;</td><td>Endadresse </td></tr>
  </table>
</dl>

<p>Definiert in Zeile <a class="el" href="i2c_8c-source.html#l00151">151</a> der Datei <a class="el" href="i2c_8c-source.html">i2c.c</a>.</p>

</div>
</div><p>
<a class="anchor" name="2b821832a74e3197fecba3661422cd27"></a><!-- doxytag: member="i2c.c::lcv_i2c_read_register" ref="2b821832a74e3197fecba3661422cd27" args="(char *device, unsigned char client, unsigned char reg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int lcv_i2c_read_register           </td>
          <td>(</td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>device</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&nbsp;</td>
          <td class="paramname"> <em>client</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&nbsp;</td>
          <td class="paramname"> <em>reg</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Schreibt ein Register über einen I2C-Bus. 
<p>
<dl compact><dt><b>Parameter:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>device</em>&nbsp;</td><td>Device </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>client</em>&nbsp;</td><td>Client </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>reg</em>&nbsp;</td><td>Register </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Rückgabe:</b></dt><dd>Registerwert </dd></dl>

<p>Definiert in Zeile <a class="el" href="i2c_8c-source.html#l00096">96</a> der Datei <a class="el" href="i2c_8c-source.html">i2c.c</a>.</p>

<p>Wird benutzt von <a class="el" href="cam-target_8c-source.html#l00290">lcv_config_read()</a>.</p>

</div>
</div><p>
<a class="anchor" name="fefa8202689ea920247d64e005ac5fca"></a><!-- doxytag: member="i2c.c::lcv_i2c_scan_bus" ref="fefa8202689ea920247d64e005ac5fca" args="(char *device)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void lcv_i2c_scan_bus           </td>
          <td>(</td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>device</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Scannt den I2C-Bus. 
<p>
<dl compact><dt><b>Parameter:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>device</em>&nbsp;</td><td>Device </td></tr>
  </table>
</dl>

<p>Definiert in Zeile <a class="el" href="i2c_8c-source.html#l00211">211</a> der Datei <a class="el" href="i2c_8c-source.html">i2c.c</a>.</p>

</div>
</div><p>
<a class="anchor" name="aefacaff83104e4b19526ea1af6f7da5"></a><!-- doxytag: member="i2c.c::lcv_i2c_write_register" ref="aefacaff83104e4b19526ea1af6f7da5" args="(char *device, unsigned char client, unsigned char reg, unsigned short value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int lcv_i2c_write_register           </td>
          <td>(</td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>device</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&nbsp;</td>
          <td class="paramname"> <em>client</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&nbsp;</td>
          <td class="paramname"> <em>reg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned short&nbsp;</td>
          <td class="paramname"> <em>value</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Lies ein Register über einen I2C-Bus. 
<p>
<dl compact><dt><b>Parameter:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>device</em>&nbsp;</td><td>Device </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>client</em>&nbsp;</td><td>Client </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>reg</em>&nbsp;</td><td>Register </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>Wert </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Rückgabe:</b></dt><dd>Null wenn erfolgreich beendet </dd></dl>

<p>Definiert in Zeile <a class="el" href="i2c_8c-source.html#l00053">53</a> der Datei <a class="el" href="i2c_8c-source.html">i2c.c</a>.</p>

<p>Wird benutzt von <a class="el" href="cam-target_8c-source.html#l00256">lcv_config_write()</a>.</p>

</div>
</div><p>
<hr size="1"><address style="text-align: right;"><small>Erzeugt am Wed Dec 19 16:38:17 2007 für LCV Framework von&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
</body>
</html>
